instr
instr
Description
Syntax:
INSTR (VARCHAR STR, VARCHAR substrate)
This function returns the location where substr first appears in str (counting from 1). If substr cannot be found in str, it will return 0.
Example
mysql> select instr("abc", "b");
+-------------------+
| instr('abc', 'b') |
+-------------------+
| 2 |
+-------------------+
mysql> select instr("abc", "d");
+-------------------+
| instr('abc', 'd') |
+-------------------+
| 0 |
+-------------------+
Keywords
INSTR